﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入功能");
            string sr = Console.ReadLine();
            Robot robot;
            robot = Sc(sr);
            robot.Working();
        }
        public static Robot Sc(String robot1)
        {
            
            Robot robot;
            if (robot1.Equals("炒菜"))
            {   
                robot = new CookRobot("茄子","炒菜",food.eggplant);
                return robot;

            }
            else if (robot1.Equals("传菜"))
            {
                robot = new DeliveryRobot("5","传菜");

                return robot;
            }
            return robot= new DeliveryRobot("5", "传菜");
        }
    }
}
